<template>
  <div>
    <MySchool :getSchoolName = "getSchoolName"/>
    <hr>
    <MyStudent @getStudentName="getStudentName" @demo="getStudentName"/>
  </div>
</template>

<script>
import MySchool from './components/MySchool.vue'
import MyStudent from './components/MyStudent.vue'

export default {
  name: 'App',
  components:{
    MySchool: MySchool,
    MyStudent: MyStudent
  },
  methods:{
    getSchoolName(schoolName){
      console.log("app收到了School组件的名字:",schoolName)
    },
    getStudentName(studentName,...params){
      console.log("app收到了Student组件的名字:",studentName,params)
    }
  }
}
</script>


